package io.hepu.robotize.aop;

import io.hepu.robotize.base.BaseService;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

import java.lang.annotation.*;

@Documented
@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Order(Ordered.HIGHEST_PRECEDENCE)
public @interface RedisId {
    // id cache key prefix
    String prefix() default "ID:CACHE:";

    // entity id
    long id() default 999000000001L;

    // entity table name
    String table();

    // id generate service
    Class<?> provider() default BaseService.class;
}
